package demo.controller;

import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;


@RestController
@RequestMapping
public class FileController {

	@PostMapping(value = "/upload")
	public @ResponseBody String upload(
			@RequestParam MultipartFile file) throws IOException {
		return "File: " + file.getOriginalFilename() + " uploaded successfully";
	}
}
